clear
set mem 100m
cd "C:\Users\...\replication_for upload\analysis MARPOR data"

use MPDataset_MPDS2025a_stata14.dta


sort country edate

gen year = year(edate)

keep if year>=1994

* Figure 1
* per603: traditional morality positive
sort country edate
twoway (line per603 year if country==41 & party==41521, lcol(black)) ///
(line per603 year if country==41 & party==41320, lcol(red)) ///
(line per603 year if country==41 & party==41420, lcol(blue)) ///
(line per603 year if country==41 & party==41111 | party==41112 | party==41113, lcol(green)) ///
(line per603 year if country==41 & party==41953, lcol(ltblue)) ///
(scatter per603 year if country==41 & party==41730, lcol(punk)) ///
(line per603 year if country==41 & party==41221 | party==41222 | party==41223, lcol(purple)) 

* Figure 2
* per607: multicult pos
sort country edate
twoway (line per607 year if country==41 & party==41521, lcol(black)) ///
(line per607 year if country==41 & party==41320, lcol(red)) ///
(line per607 year if country==41 & party==41420, lcol(blue)) ///
(line per607 year if country==41 & party==41111 | party==41112 | party==41113, lcol(green)) ///
(line per607 year if country==41 & party==41953, lcol(ltblue)) ///
(scatter per607 year if country==41 & party==41730, lcol(punk)) ///
(line per607 year if country==41 & party==41221 | party==41222 | party==41223, lcol(purple)) 

* Figure 3
* per608: multicult negative
sort country edate
twoway (line per608 year if country==41 & party==41521, lcol(black)) ///
(line per608 year if country==41 & party==41320, lcol(red)) ///
(line per608 year if country==41 & party==41420, lcol(blue)) ///
(line per608 year if country==41 & party==41111 | party==41112 | party==41113, lcol(green)) ///
(line per608 year if country==41 & party==41953, lcol(ltblue)) ///
(scatter per608 year if country==41 & party==41730, lcol(punk)) ///
(line per608 year if country==41 & party==41221 | party==41222 | party==41223, lcol(purple)) 

* Figure 4
*per201_2: human rights

keep if year>=2017
sort country edate
twoway (line per201_2 year if country==41 & party==41521, lcol(black)) ///
(line per201_2 year if country==41 & party==41320, lcol(red)) ///
(line per201_2 year if country==41 & party==41420, lcol(blue)) ///
(line per201_2 year if country==41 & party==41111 | party==41112 | party==41113, lcol(green)) ///
(line per201_2 year if country==41 & party==41953, lcol(ltblue)) ///
(scatter per201_2 year if country==41 & party==41730, lcol(punk)) ///
(line per201_2 year if country==41 & party==41221 | party==41222 | party==41223, lcol(purple)) 

